def number_checker(number):
    try:
        result = int(number)
        return result
    except ValueError:
        return None
    

def is_positive(number):
    # result = number_checker(number)
    # if result is None:
    #     return "请输入数字"
    # elif result <0:
    #     return False
    # elif result >=0 :
    #     return True
    if number >=0:
        return True
    elif number <0 :
        return False


    
def is_not_zero(number):
    result = number_checker(number)
    if result is None:
        return "请输入数字"
    elif result != 0:
        return True
    else:
        return False
    
def get_valid_age():
    while True:
        number = input("input your age:")
        result1 = number_checker(number)
        if result1 is None:
            return "请输入数字"
            continue
        if not is_positive(result1):
            return "你的年龄必须为正数"
            continue
        else:
            return f"你的年龄是：{result1}岁"
            


# print(get_valid_age())
# print(number_checker("asdf"))
    
# print(is_not_zero("0"))
# print(number_checker("num"))